﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace mtg_trader.Database.DbSets
{
    public sealed class Card
    {

        [Key]
        public string Id { get; set; }

        public string Name { get; set; }

        public string ManaCost { get; set; }

        // public string ConvertedManaCost { get; set; }

        public byte[] Image { get; set; }

        public string MagicCardsInfoUri { get; set; }

        public string ImageUri { get; set; }

        public int Rarity { get; set; }

        [NotMapped]
        public Rarity CardRarity
        {
            get { return (Rarity) Rarity; }
            set { Rarity = (int) value; }
        }

        public string Types { get; set; }

        public string ErrataTypes { get; set; }

        public decimal LowPrice { get; set; }

        public decimal MediumPrice { get; set; }

        public decimal HighPrice { get; set; }

        public string Description { get; set; }

        public string Flavor { get; set; }

        public string Artist { get; set; }

        public string Power { get; set; }

        public string Toughness { get; set; }

        public string Loyalty { get; set; }

        public int Number { get; set; }

        public string Letter { get; set; }

    }

    public enum Rarity
    {
        Common = 0,
        Uncommon = 1,
        Rare = 2,
        MythicRare = 3,
        Special = 4,
        BasicLand = 5,
        Unknown = -1,
    }
}